// 导入统一定义的type
import * as types from '../actionTypes/xxx';

// 创建 store 需要一个 reducer
export const xxx = (state = [], action) => {
  // 改为 if/else 实现 reducer
  console.log('xxx action', action);
  if (action.type === types.ADD) {
    return [1, 2];
  } else if (action.type === types.DEL) {
    return [1];
  } else {
    return state;
  }
};
